-
Notifications
You must be signed in to change notification settings - Fork 204
MTE ID Reallocation #2793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MTE ID Reallocation #2793
Conversation
src/main/java/gregtech/common/metatileentities/MetaTileEntityRegistration.java
Show resolved
Hide resolved
src/main/java/gregtech/common/metatileentities/MetaTileEntityRegistration.java
Show resolved
Hide resolved
src/main/java/gregtech/common/metatileentities/MetaTileEntityRegistration.java
Show resolved
Hide resolved
| MetaTileEntities.registerSimpleMetaTileEntity(MetaTileEntities.PACKER, 500, "packer", RecipeMaps.PACKER_RECIPES, | ||
| Textures.PACKER_OVERLAY, true); | ||
|
|
||
| // FREE, IDs 515-529 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we collapse this free space as well, and every other free space in the singleblocks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every ID that moves takes up more memory for every user of the mod permanently, since one cannot know in advance if migration is required until data is loaded that warrants it, and this does not only happen on initial world load either. You either encumber users with permanent memory usage increase or a permanent chunk loading performance overhead, memory is the better choice. I want to keep what we migrate to a minimum if possible.
I don't want to collapse any free space unnecessarily, especially when they are of a standard size. We can fill things in the gaps later when the time comes. Collapsing free space restricts us in the future because many of these gaps are intentionally placed to leave room for adding new things in order. This lets us keep all of the similar things together in jei instead of them being scattered around, or requiring the crazy getSubItems override hacks I removed in this PR to order them.
|
|
||
| // Other single block machines | ||
|
|
||
| // Diesel Generator, IDs 935-949 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move the singleblock generators to start at 900?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my other comment.
src/main/java/gregtech/common/metatileentities/MetaTileEntityRegistration.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/metatileentities/MetaTileEntityRegistration.java
Show resolved
Hide resolved
| new MetaTileEntityMultiFluidHatch(gregtechId("fluid_hatch.export_9x"), GTValues.EV, 9, true)); | ||
| for (int i = GTValues.IV; i <= (GregTechAPI.isHighTier() ? GTValues.OpV : GTValues.UHV); i++) { | ||
| int index = i - GTValues.IV; | ||
| int startId = i > GTValues.UHV ? 1800 : 1780; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another place where high-tier components are located in the 1800 range, but not being migrated by the datafixer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the IO hatch comment.
What
Reallocates MTE IDs to give us more room to fit things which previously were out of order.
As a result, all variants of energy, item, and fluid hatches are registered for all tiers, and recipes were given to them. Additionally, all machines doing sub-items ordering no longer do so.
MTE registration was moved into a dedicated class to reduce IDE strain when opening the
MetaTileEntitiesclass.All old MTE IDs are datafixed to their new ones.
Outcome
Gives us much more space to add MTEs for the base mod in an organized order.
Potential Compatibility Issues
Everything should migrate over as expected.